package com.ybb.vue.domain.vo;

import com.ybb.vue.common.util.ExcelImport;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;

/**
 * @author ybb
 * @version 1.0
 * @Description TODO
 * @Date 2023/3/15 21:21
 */

@Data
public class EpmResidentImprotVo {

    /**
     * 行号
     */
    private int rowNum;
    /**
     * 居民姓名
     */
    @ExcelImport(value = "姓名",required = true)
    private String name;

    /**
     *  年龄
     */
    @ExcelImport(value = "年龄",required = true)
    @Min(value = 0,message = "年龄不能小于0岁")
    @Max(value = 150,message = "年龄不能大于150岁")
    private Integer age;

    /**
     * 性别
     */
    @ExcelImport(value = "性别",required = true)
    private String sex;

    /**
     * 手机号
     */
    @ExcelImport(value = "手机号",maxLength = 11,required = true)
    @Pattern(regexp = "^[\\d\\*]{7,12}$", message = "手机号格式有误")
    private String phoneNumber;

    /**
     * 身份证号
     */
    @ExcelImport(value = "身份证号",maxLength = 18,required = true)
    @Pattern(regexp = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$", message = "身份证号格式有误")
    private String idCard;

    /**
     * 居民所在楼栋
     */
    @ExcelImport(value = "楼栋号",required = true)
    private String building;

    /**
     * 单元号
     */
    @ExcelImport(value = "单元号",required = true)
    private String unit;

    /**
     * 门牌号
     */
    @ExcelImport(value = "门牌号",required = true)
    private String houseNumber;

    /**
     * 健康码状态,{0绿码，1黄码，2红码，3未知弹窗，4未申请健康码}
     */
    private String healthStatus;

    /**
     * 错误的数据
     */
    private String rowData;

    /**
     * 错误提示
     */
    private String rowTips;
}
